@charset "UTF-8";
@import "../../../assets/styles/common.scss";

.mb-footer {
  @extend .mb-responsive-container;
  padding: 0 !important;
  background: $mb-theme-light-sidebar-background;

  &._placeholder {
    height: 160px;
  }

  .social {
    height: 72px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    .social-link {
      position: relative;
      list-style: none;
      width: 24px;
      height: 24px;
      margin: 0 15px;
      background-repeat: no-repeat;
      background-position: 0 0;
      background-size: 24px 24px;
      vertical-align: middle;
      cursor: pointer;
      > a {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
      }
      &.github {
        background-image: url("../../../assets/images/footer/ic_github_light.svg");
      }
      &.zhihu {
        background-image: url("../../../assets/images/footer/ic_zhihu_light.svg");
      }
      &.wechat {
        background-image: url("../../../assets/images/footer/ic_wechat_light.svg");
        .hover-content {
          position: absolute;
          width: 160px;
          height: 160px;
          left: -68px;
          top: -170px;
          box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2), 0 5px 5px 0 rgba(0, 0, 0, 0.24);
          transform: scale(0);
          opacity: 0;
          transform-origin: bottom;
          transition: all .2s ease-out;
        }
      }
      &.email {
        background-image: url("../../../assets/images/footer/ic_email_light.svg");
        .hover-content {
          position: absolute;
          background: #fff;
          white-space: nowrap;
          height: 24px;
          line-height: 24px;
          padding: 0 12px;
          left: 50%;
          width: 7.2em;
          margin-left: -3.6em;
          top: -36px;
          font-size: 12px;
          box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2), 0 5px 5px 0 rgba(0, 0, 0, 0.24);
          transform: scale(0);
          opacity: 0;
          transform-origin: bottom;
          transition: all .2s ease-out;
        }
      }
      &:hover {
        opacity: 1 !important;
        .hover-content {
          opacity: 1;
          transform: scale(1);
        }
      }
    }
  }

  &._about {
    .about {
      display: flex;
      justify-content: space-between;
      align-items: center;
      height: 144px;
      .about-item {
        list-style: none;
        &.file-id {
          margin-left: 24px;
        }
        &.about-author {
          display: block;
          position: absolute;
          line-height: 144px;
          left: 0;
          width: 100%;
          text-align: center;
          transition: all .2s ease-out;
          .heart-wrap {
            position: relative;
            display: inline-block;
            width: 14px;
            height: 24px;
            line-height: 24px;
            vertical-align: middle;
            .heart {
              position: absolute;
              left: 0;
              top: 4px;
            }
          }
          .info-link {
            padding: 8px 0;
            border-bottom: 2px solid transparent;
            transition: all .2s ease-out;
            &:hover {
              padding: 4px 0;
              border-bottom-color: $mb-theme-light-font;
            }
          }
        }
        &.view-source {
          margin-right: 24px;
        }
      }
    }
  }
}

#mb-dark-theme {
  .mb-footer {
    background: $mb-theme-dark-sidebar-background;
  }
  .about-author .info-link:hover {
    border-bottom-color: $mb-theme-dark-font;
  }
  .social-link {
    &.github {
      background-image: url("../../../assets/images/footer/ic_github_dark.svg");
    }
    &.zhihu {
      background-image: url("../../../assets/images/footer/ic_zhihu_dark.svg");
    }
    &.wechat {
      background-image: url("../../../assets/images/footer/ic_wechat_dark.svg");
    }
    &.email {
      background-image: url("../../../assets/images/footer/ic_email_dark.svg");
    }
  }
}

@media (min-width: 0) {
  .mb-footer {
    .social {
      justify-content: center;
    }
    .about {
      justify-content: center !important;
      .file-id {
        margin-left: 0 !important;
      }
      .about-author,
      .view-source {
        display: none !important;
      }
    }
  }
}
@media (min-width: 700px) {
  .mb-footer {
    .social {
      justify-content: flex-end;
    }
    .about {
      justify-content: space-between !important;
      .file-id {
        margin-left: 24px !important;
      }
      .about-author,
      .view-source {
        display: block !important;
      }
    }
  }
}
